<script setup lang="ts">
import {messageStore} from "../store";

const store = messageStore()


const currentUser = store.getUserMapper()


</script>

<template>
<div id="headerBox">
  <img class="avatar" alt="avatar" :src="currentUser.get(store.getCurrentUserId)?.avatar">
</div>
</template>

<style scoped>
@keyframes rotate {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}

#headerBox {
  width: 90%;
  height: 40px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: visible;
  border-bottom: var(--border) solid 2px;
  &::before {
    content: '';
    position: absolute;
    top: calc(50% - 8px);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    animation: rotate 1s linear infinite;
    background: linear-gradient(to right, #fa3b56, var(--mian-view-bg));
  }
  .avatar {
    top: calc(50% - 5px);
    position: absolute;
    z-index: 1;
    height: 50px;
    object-fit: cover;
    width: 50px;
    border-radius: 100%;

  }
}
</style>